<script type="text/javascript">
function getfav()
{	
	var url = '<{$config.weburl}>/ajax_back_end.php';
	var myurl='<{$config.weburl}>/?m=offer%26s=offer_detail%26id=<{$smarty.get.id}>';
	var u='<{$smarty.cookies.USER}>';
	if(u=='')
	{
	  alert('<{$lang.no_logo}>');
	  window.location.href='<{$config.weburl}>/login.php?forward='+myurl;
	  return false;
	}
	var fu='<{$smarty.get.id}>';
 	var typ='2';
	var ttil='<{$de.title|regex_replace:"/[\r\t\n]/":""}>';
	var mpic='<{$config.weburl}>/uploadfile/zsimg/<{$de.showimg}>.jpg';
	var des='<{$de.title|strip_tags}>';
    var pars = 'user='+u+'&fid='+fu+'&type='+typ+'&title='+ttil+'&url='+myurl+'&des='+des+'&picurl='+mpic;
	var myAjax = new Ajax.Request(url,{method: 'post', parameters: pars, onComplete: showResponse});
	function showResponse(originalRequest)
	{
	    if(originalRequest.responseText>1)
	       alert('<{$lang.fav_ok}>');
		else if (originalRequest.responseText>0)
	       alert('<{$lang.fav_isbing}>');
		else
	       alert('<{$lang.error}>');
	}
}
function seebig(id)
{
    $('imgmove').innerHTML='<a href="<{$config.weburl}>/uploadfile/zsimg/'+id+'.jpg" target="_blank">'+
	'<img id="img'+id+'" border="0" src="<{$config.weburl}>/uploadfile/zsimg/'+id+'.jpg" ></a>';
	if($('img'+id).height>$('img'+id).width)
		$('img'+id).height=275;
	else
		$('img'+id).width=275;
}
var weburl='<{$config.weburl}>';
function copyToClipboard(txt)
{
  try{
	  window.clipboardData.setData("Text",txt);  
	  alert('<{$lang.copysuc}>'); 
  }
  catch(e){alert('<{$lang.noace}>');}
}
</script>
<script src="<{$config.weburl}>/script/my_lightbox.js" language="javascript"></script>
<div class="guanggao1"><script src='<{$config.weburl}>/api/ad.php?id=74&catid=<{$smarty.get.id}>&sname=<{$sname}>'></script></div>
<div class="line2"></div>
<div id="allNews">
    <div id="new-content1-left2"> 
        <div id="new-content1-left-top">
            <span class="news1">你现在所在的位置是:</span>
            <span class="news2"><a href='<{$config.weburl}>/'><{$lang.home}></a></span>
            <span class="news2">></span>
            <span class="news2"><a href="<{$config.weburl}>/?m=offer&s=offer_list"><{$lang.shop}></a></span>
            <span class="news2">></span>
            <span class="news2"><{$guide}></span>
        </div>
        <div id="mingzi" class="newstitle">
            <{$de.offertype}><{$de.title}>
        </div>
        <div class="xiangqingline"></div>
        <div id="wenziceng">
            <div id="imageceng">
                <div id="imagesxiangqing">
                    <{assign var=img value=$de.cover}>
                     <{html_image file=uploadfile/product/$img width=250 alt=$list.title}>	
                </div>
                
                <div id="fenxiang">
                    <span>
                        <a href="javascript:alertWin('<{$lang.share}>','<br><span style=width:80px;><{$lang.purl}></span><input id=textfield type=text size=45 value=<{$config.weburl}>/?m=offer&s=offer_detail&id=<{$de.id}>>
                           <div style=width:340px;padding-left:60px;text-align:left;><br><button onclick=copyToClipboard(\'<{$config.weburl}>/?m=offer&s=offer_detail&id=<{$de.id}>\')><{$lang.copysend}></button></div>',400,100,'');">
                        <img src="templates/default/images/add_to_share.png" />
                        </a>
                    </span>
                    <span class="shoucang">
                        <a href="javascript:getfav();"><img src="<{$config.weburl}>/image/<{$config.temp}>/add_to_fav.png" /></a>
                    </span>
                </div>
            </div>
            <div id="fontceng">
                <ul>
                    <li><span class="jiage">产品价格:</span><span class="jiageweizhi"><{if $de.price!=''}><span style="color:#FF5500; font-size:24px;"><{$de.price|number_format:2}></span> /<{$de.priceDes}><{else}>暂无<{/if}></span></li>
                    <li><span class="jiage">产品规格:</span><span class="jiageweizhi"><{$de.gg}></span></li>
                    <li><span class="jiage">发布时间:</span><span class="jiageweizhi"><{$de.uptime|date_format}></span></li>
                    <li><span class="jiage">有&nbsp;效&nbsp;期:</span><span class="jiageweizhi"><{$de.valid_time}></span></li>
                </ul>
                <div id="miaoshutupian">
                    <{$de.con}>
                </div>
                <div id="lianxifang"><a href="<{$config.weburl}>/shop.php?uid=<{$de.userid}>&action=mail&tid=<{$de.id}>&contype=2">
                 <img src="<{$config.weburl}>/image/<{$config.temp}>/sendmail.gif" />
                 </a></div>
            </div>
        </div>
        <div class="xiangqingwenzi"><h3>产品详情</h3></div>
        <div class="xiangqingline1"></div>							
        <div class="wenziliebiao">
            <{$de.detail}>  
        </div>
        <div class="pinglun">
            <{insert name="label" type="comment" ctype=2 cid=$smarty.get.id temp="comment_default" }>
        </div>
        <div class="pltitle">全部评论</div>
        <div class="pllist">
            
            <table width="100%" height="100%" style="border-collapse:collapse;border:solid #999;border-width:1px 0px 0px 0px;">
                <tr>
                    <th width="10%" align="left" style="border-bottom: 1px solid #999999;" scope="col">评论人</th>
                    <th width="80%" align="left" style="border-bottom:1px solid #999999">评论内容</th>
                    <th width="10%" align="left" style="border-bottom:1px solid #999999">评论时间</th>
                </tr>
                <{foreach from=$review.list item=list}>
                <tr>
                    <td width="10%" align="left" style="border-bottom: 1px solid #999999;" scope="col"><{$list.fromname}></td>
                    <td width="80%" align="left" style="border-bottom:1px solid #999999"><{$list.content}></td>
                    <td width="10%" align="left" style="border-bottom:1px solid #999999"><{$list.uptime|dateformat}></td>
                </tr>
                <{/foreach}>
                <tr>
                    <td class="page" colspan="3" style="border-bottom: 1px dotted #999999;text-align: center;height: 30px;">
                        <{$review.page}>
                    </td>
                </tr>
                    
            </table>

        </div>
    </div>
    <div id="new-content1-Middle1"></div>
    <div id="new-content1-right"><script src='<{$config.weburl}>/api/ad.php?id=75&catid=<{$smarty.get.id}>&sname=<{$sname}>'></script></div>
    <div class="newguanggaowei"><script src='<{$config.weburl}>/api/ad.php?id=76&catid=<{$smarty.get.id}>&sname=<{$sname}>'></script></div>   
</div>